﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace BasePlatformCommon
{
	[JsonObject(MemberSerialization.OptIn)]
	public class Device
	{
		public string name = "";

		public DeviceType deviceType = DeviceType.Unknown;

		[JsonProperty]
		public int index = -1;

		public int totalIndex = -1;

		public bool hasError = false;

		public string tipMessage = "";
	}

    public enum DeviceType
    {
        MainControl = 0,
        MainPort = 1,
        SubControlChain = 2,
        SubControl = 3,
        Equipment = 4,
        SubPort = 5,
        Lamp = 6,
        Channel = 7,
        Unknown = 8
    }

    public enum ProgramType
    {
        Unknown = 0,
        App = 1,
        Test = 2,
        Boot = 3
    }

}
